using System;
using System.Text;
namespace ns0
{
	public class ResultPoint
	{
		private float float_0;
		private float float_1;
		public virtual float X
		{
			get
			{
				return this.float_0;
			}
		}
		public virtual float Y
		{
			get
			{
				return this.float_1;
			}
		}
		public ResultPoint(float float_2, float float_3)
		{
			this.float_0 = float_2;
			this.float_1 = float_3;
		}
		public override bool Equals(object other)
		{
			bool result;
			if (other is ResultPoint)
			{
				ResultPoint resultPoint = (ResultPoint)other;
				result = (this.float_0 == resultPoint.float_0 && this.float_1 == resultPoint.float_1);
			}
			else
			{
				result = false;
			}
			return result;
		}
		public override int GetHashCode()
		{
			return 0;
		}
		public override string ToString()
		{
			StringBuilder stringBuilder = new StringBuilder(25);
			stringBuilder.Append('(');
			stringBuilder.Append(this.float_0);
			stringBuilder.Append(',');
			stringBuilder.Append(this.float_1);
			stringBuilder.Append(')');
			return stringBuilder.ToString();
		}
		public static void orderBestPatterns(ResultPoint[] patterns)
		{
			float num = ResultPoint.distance(patterns[0], patterns[1]);
			float num2 = ResultPoint.distance(patterns[1], patterns[2]);
			float num3 = ResultPoint.distance(patterns[0], patterns[2]);
			ResultPoint resultPoint;
			ResultPoint resultPoint2;
			ResultPoint resultPoint3;
			if (num2 >= num && num2 >= num3)
			{
				resultPoint = patterns[0];
				resultPoint2 = patterns[1];
				resultPoint3 = patterns[2];
			}
			else
			{
				if (num3 >= num2 && num3 >= num)
				{
					resultPoint = patterns[1];
					resultPoint2 = patterns[0];
					resultPoint3 = patterns[2];
				}
				else
				{
					resultPoint = patterns[2];
					resultPoint2 = patterns[0];
					resultPoint3 = patterns[1];
				}
			}
			if (ResultPoint.smethod_0(resultPoint2, resultPoint, resultPoint3) < 0f)
			{
				ResultPoint resultPoint4 = resultPoint2;
				resultPoint2 = resultPoint3;
				resultPoint3 = resultPoint4;
			}
			patterns[0] = resultPoint2;
			patterns[1] = resultPoint;
			patterns[2] = resultPoint3;
		}
		public static float distance(ResultPoint pattern1, ResultPoint pattern2)
		{
			float num = pattern1.X - pattern2.X;
			float num2 = pattern1.Y - pattern2.Y;
			return (float)Math.Sqrt((double)(num * num + num2 * num2));
		}
		private static float smethod_0(ResultPoint resultPoint_0, ResultPoint resultPoint_1, ResultPoint resultPoint_2)
		{
			float num = resultPoint_1.float_0;
			float num2 = resultPoint_1.float_1;
			return (resultPoint_2.float_0 - num) * (resultPoint_0.float_1 - num2) - (resultPoint_2.float_1 - num2) * (resultPoint_0.float_0 - num);
		}
	}
}
